{if $pagesCount > 0}
{if $smarty.session.page != 0}<a class="page" href="javascript:setTableLimit({$smarty.session.page-1})">&lt;</a>{/if}
{for $page=0 to $pagesCount}
    <a class="page{if $smarty.session.page==$page} currant{/if}" id="$page" href="javascript:setTableLimit({$page})">{$page+1}</a>
{/for}
{if $smarty.session.page != $pagesCount}<a class="page" href="javascript:setTableLimit({$smarty.session.page+1})">&gt;</a>{/if}
{/if}